﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Xajhzwb.Components.Publish
{
    public class UploadEventArgs : EventArgs
    {
        public UploadEventArgs()
        {

        }
    
        public UploadEventArgs(bool cancel)
        {
            m_Cancel = cancel;
        }

        private bool m_Cancel;
        public bool Cancel
        {
            get { return m_Cancel; }
            set { m_Cancel = value; }
        }
    }

    public class UploadErrorEventArgs : UploadEventArgs
    {
        public UploadErrorEventArgs(int taskID, string taskName, Exception error)
        {
            m_TaskID = taskID;
            m_TaskName = taskName;
            m_Error = error;
        }

        private Exception m_Error;
         public Exception Error
        {
            get { return m_Error; }
            set { m_Error = value; }
        }

        private int m_TaskID;
        public int TaskID
        {
            get { return m_TaskID; }
            set { m_TaskID = value; }
        }

        private string m_TaskName;
        public string TaskName
        {
            get { return m_TaskName; }
            set { m_TaskName = value; }
        }
    }

    public class UploadStartedEventArgs : UploadEventArgs
    {
        public UploadStartedEventArgs(int taskID, string taskName)
        {
            m_TaskID = taskID;
            m_TaskName = taskName;
        }

        private int m_TaskID;
        public int TaskID
        {
            get { return m_TaskID; }
            set { m_TaskID = value; }
        }

        private string m_TaskName;
        public string TaskName
        {
            get { return m_TaskName; }
            set { m_TaskName = value; }
        }        
    }

    public class UploadCompletedEventArgs : UploadEventArgs
    {
        public UploadCompletedEventArgs(int taskID, string taskName)
        {
            m_TaskID = taskID;
            m_TaskName = taskName;
        }

        private int m_TaskID;
        public int TaskID
        {
            get { return m_TaskID; }
            set { m_TaskID = value; }
        }

        private string m_TaskName;
        public string TaskName
        {
            get { return m_TaskName; }
            set { m_TaskName = value; }
        }
    }

    public class UploadFailedEventArgs : UploadEventArgs
    {
        public UploadFailedEventArgs(int taskID, string taskName)
        {
            m_TaskID = taskID;
            m_TaskName = taskName;
        }

        private Int64 m_TaskID;
        public Int64 TaskID
        {
            get { return m_TaskID; }
            set { m_TaskID = value; }
        }

        private string m_TaskName;
        public string TaskName
        {
            get { return m_TaskName; }
            set { m_TaskName = value; }
        }
    }

    public class UploadTempDataCompletedEventArgs : UploadEventArgs
    {
        public UploadTempDataCompletedEventArgs(int taskID, string taskName)
        {
            m_TaskID = taskID;
            m_TaskName = taskName;
        }

        private Int64 m_TaskID;
        public Int64 TaskID
        {
            get { return m_TaskID; }
            set { m_TaskID = value; }
        }

        private string m_TaskName;
        public string TaskName
        {
            get { return m_TaskName; }
            set { m_TaskName = value; }
        }
    }

    public class UploadLogEventArgs : UploadEventArgs
    {
        public UploadLogEventArgs(int taskID, string strLog)
        {
            m_TaskID = taskID;
            m_strLog = strLog;
        }

        private string m_strLog;
        public string strLog
        {
            get { return m_strLog; }
            set { m_strLog = value; }
        }

        private Int64 m_TaskID;
        public Int64 TaskID
        {
            get { return m_TaskID; }
            set { m_TaskID = value; }
        }
    }
}
